<template>
  <div>门户-首页</div>
  <a-space>
    <a href="/#/official" target="_blank">官网</a>
    <a-button v-if="!userInfo" type="primary" @click="visible = true">登陆按钮</a-button>
  </a-space>

  <LoginModal v-model:visible="visible" :load="userStore.login" />
</template>

<script lang="ts" setup>
import { ref } from 'vue';
import { storeToRefs } from 'pinia';
import LoginModal from '@/components/LoginModal/index.vue';
import { useUserStore } from '@portal/stores/user';
import router from '@/router';

const userStore = useUserStore();
const { userInfo } = storeToRefs(userStore);

const visible = ref(false);

const navigatorTo = () => {
  router.replace({ path: '/official' });
};
</script>
<style scoped lang="less"></style>
